home *** CD-ROM | disk | FTP | other *** search
/ Dragon Blade - Wrath of Fire (USA) (Press Kit) / Dragon Blade - Wrath of Fire (USA) (Press Kit).bin / pc / main.swf / scripts / frame_40 / DoAction.as
Encoding:
Text File  |  2007-01-01  |  3.4 KB  |  83 lines

  1. function loadImage(iName)
  2. {
  3.    imageLoader.loadClip(content_xml.firstChild.childNodes[2].childNodes[1].childNodes[iName].attributes.preview,loadIntoMe_mc);
  4. }
  5. function brandEnabler(loaderName)
  6. {
  7.    navBA_mc.buttons_mc[loaderName].hitVal = 1;
  8.    navBA_mc.buttons_mc[loaderName].hit_mc.enabled = false;
  9.    btnInfob_mc.hit2_mc.tween("_y",0,0.3,"easeOutQuad");
  10.    btnInfob_mc.name_txt.tween("_y",9,0.3,"easeOutQuad");
  11.    navBA_mc.buttons_mc[prevName].hit_mc.enabled = true;
  12.    navBA_mc.buttons_mc[prevName].hit_mc.colorTo(0,0.3,"easeOutSine");
  13.    navBA_mc.buttons_mc[prevName].name_txt.colorTo(16770048,0.3,"easeOutSine");
  14.    navBA_mc.buttons_mc[prevName].arrow_txt.colorTo(16777215,0.3,"easeOutSine");
  15.    navBA_mc.buttons_mc[prevName].loadBar_mc.tween("_width",0,0.3,"easeInSine");
  16.    prevName = loaderName;
  17. }
  18. stop();
  19. secCount_var = 1;
  20. headingSub_txt.text = "BOX ART";
  21. stop();
  22. var Bspacing = 1;
  23. b = 0;
  24. while(b < imageTotal)
  25. {
  26.    imageTotal = content_xml.firstChild.childNodes[2].childNodes[1].childNodes.length;
  27.    btnPreview = content_xml.firstChild.childNodes[2].childNodes[1].childNodes[b].attributes.preview;
  28.    btnHiRes = content_xml.firstChild.childNodes[2].childNodes[1].childNodes[b].attributes.hiRes;
  29.    btnName = content_xml.firstChild.childNodes[2].childNodes[1].childNodes[b].firstChild.nodeValue;
  30.    if(b == 0)
  31.    {
  32.       var butName = "button" + b + "_mc";
  33.       navBA_mc.buttons_mc.attachMovie("button",butName,b);
  34.       navBA_mc.buttons_mc[butName]._alpha = 0;
  35.       navBA_mc.buttons_mc[butName].alphaTo(100,0.3,"easeOutSine");
  36.       navBA_mc.buttons_mc[butName].name_txt.html = true;
  37.       navBA_mc.buttons_mc[butName].name_txt.autoSize = "left";
  38.       navBA_mc.buttons_mc[butName].name_txt.wordWrap = true;
  39.       navBA_mc.buttons_mc[butName].name_txt.htmlText = btnName;
  40.       navBA_mc.buttons_mc[butName].HRLink = btnHiRes;
  41.       navBA_mc.buttons_mc[butName].PLink = btnPreview;
  42.       navBA_mc.buttons_mc[butName].PNum = b;
  43.    }
  44.    else
  45.    {
  46.       var butName = "button" + b + "_mc";
  47.       navBA_mc.buttons_mc.attachMovie("button",butName,b);
  48.       navBA_mc.buttons_mc[butName]._alpha = 0;
  49.       navBA_mc.buttons_mc[butName].alphaTo(100,0.3,"easeOutSine");
  50.       var buttonsHeight = Math.round(navBA_mc.buttons_mc._height);
  51.       var y = Bspacing;
  52.       navBA_mc.buttons_mc[butName].name_txt.autoSize = "left";
  53.       navBA_mc.buttons_mc[butName].name_txt.wordWrap = true;
  54.       navBA_mc.buttons_mc[butName].name_txt.html = true;
  55.       navBA_mc.buttons_mc[butName].name_txt.htmlText = btnName;
  56.       navBA_mc.buttons_mc[butName]._y = y + buttonsHeight;
  57.       navBA_mc.buttons_mc[butName].HRLink = btnHiRes;
  58.       navBA_mc.buttons_mc[butName].PLink = btnPreview;
  59.       navBA_mc.buttons_mc[butName].PNum = b;
  60.    }
  61.    if(b == imageTotal - 1)
  62.    {
  63.       if(navBA_mc.buttons_mc._height > 300)
  64.       {
  65.          navBA_mc.gotoAndStop(2);
  66.       }
  67.    }
  68.    b++;
  69. }
  70. var imageLoader = new MovieClipLoader();
  71. var loadHandler = new Object();
  72. imageLoader.addListener(loadHandler);
  73. loadHandler.onLoadInit = function(loadIntoMe_mc)
  74. {
  75.    loadIntoMe_mc.colorTo(null,0.3,"easeOutQuad",0.3);
  76.    navBA_mc.buttons_mc[prevName].loadBar_mc.tween("_width",0,0.3,"easeInSine",1);
  77. };
  78. loadHandler.onLoadProgress = function(loadIntoMe_mc, loaded, total)
  79. {
  80.    percent_loaded = Math.round(loaded / total * 188);
  81.    navBA_mc.buttons_mc[prevName].loadBar_mc._width = percent_loaded;
  82. };
  83.